import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import VueRouter from "vue-router"

import Axios from 'axios'//引入axios
import Request from './assets/js/request.js'
import 'jquery/dist/jquery.min' 
import 'bootstrap/dist/css/bootstrap.css'
import router from "./router/index"
 
import * as echarts from 'echarts/core';
	import {
	  TitleComponent,
	  PolarComponent,
	  TooltipComponent
	} from 'echarts/components';
import { BarChart } from 'echarts/charts';
import { CanvasRenderer } from 'echarts/renderers';

import { ToolboxComponent } from 'echarts/components';
import { GridComponent } from 'echarts/components';
import { VisualMapComponent } from 'echarts/components';
import { LineChart } from 'echarts/charts';
echarts.use([GridComponent]);
echarts.use([ToolboxComponent]);
echarts.use([VisualMapComponent]);
echarts.use([LineChart]);

var axios = require('axios')
// 全局注册，之后可在其他组件中通过 this.$axios 发送数据
Vue.prototype.$axios = axios//把axios挂载到vue上

// 设置反向代理，前端请求默认发送到 http://localhost:8086/api
axios.defaults.baseURL = 'http://localhost:8086'
Vue.config.productionTip = false

Vue.use(ElementUI);
Vue.use(echarts);
 
echarts.use([
  TitleComponent,
  PolarComponent,
  TooltipComponent,
  BarChart,
  CanvasRenderer
]);

new Vue({
	router,
    render: h => h(App),
}).$mount('#app')
